﻿@model AgileZen.Models.Comments

@{
    ViewBag.Title = "Comments";
}

<h2>Index</h2>

@Html.ActionLink("Add", "Add", "Comment", new { projectId = Int32.Parse(Request.QueryString["projectid"]), storyId = Int32.Parse(Request.QueryString["storyid"]) }, null)

<table>
    <tr>
        <td>Name</td>
        <td>Edit</td>
        <td></td>
    </tr>
@foreach (var comment in Model.Items)
{ 
    <tr>
        <td>@Html.ActionLink("Edit", "Edit", "Comment", new { id = comment.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), storyId = Int32.Parse(Request.QueryString["storyid"]) }, null)</td>
        <td>@Html.ActionLink(comment.Text, "Details", "Comment", new { id = comment.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), storyId = Int32.Parse(Request.QueryString["storyid"]) }, null)</td>
        <td>@Html.ActionLink("Delete", "Delete", "Comment", new { id = comment.Id, projectId = Int32.Parse(Request.QueryString["projectid"]), storyId = Int32.Parse(Request.QueryString["storyid"]) }, null)</td>
    </tr>
}
</table>

